//
//  NewSongsNewDVDCollectionViewCell.m
//  DayByDay
//
//  Created by dllo on 16/5/16.
//  Copyright © 2016年 dllo. All rights reserved.
//

#import "NewSongsNewDVDCollectionViewCell.h"
#import <UIImageView+WebCache.h>



@interface NewSongsNewDVDCollectionViewCell ()

@property (nonatomic, strong)UIImageView *imageV;
@property (nonatomic, strong)UILabel *songNameLabel;
@property (nonatomic, strong)UILabel *songerNameLabel;

@end

@implementation NewSongsNewDVDCollectionViewCell

- (instancetype)initWithFrame:(CGRect)frame {
    self = [super initWithFrame:frame];
    if (self) {
        [self createView];
    }
    return self;
}

- (void)setModel:(SongsModel *)model {
    _model = model;
    self.songNameLabel.text = model.name;
    self.songerNameLabel.text = model.singerName;
    [self.imageV sd_setImageWithURL:[NSURL URLWithString:_model.picUrl]];
}

- (void)createView {
    self.imageV = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, self.contentView.frame.size.width, self.contentView.frame.size.width)];
    self.songNameLabel = [[UILabel alloc] initWithFrame:CGRectMake(0, self.contentView.frame.size.width + 5, self.contentView.frame.size.width, 20)];
    self.songerNameLabel = [[UILabel alloc] initWithFrame:CGRectMake(0, self.contentView.frame.size.width + 25, self.contentView.frame.size.width, 20)];
    [self.contentView addSubview:self.imageV];
    [self.contentView addSubview:self.songerNameLabel];
    [self.contentView addSubview:self.songNameLabel];
}

@end
